﻿package com.study.zouchao.superproject.base_zou.api_zou;


import com.study.zouchao.superproject.comtaskdetail.model.EnrollResult;
import com.study.zouchao.superproject.comtaskdetail.model.IsEnrolledResult;
import com.study.zouchao.superproject.comtaskdetail.model.TaskDetailResult;
import com.study.zouchao.superproject.comtasklist.fragment.model.entity.TaskListResult;
import com.study.zouchao.superproject.homepage.model.result.entity.BaiduNewResult;
import com.study.zouchao.superproject.login.model.entity.result.LoginResult;
import com.study.zouchao.superproject.modifyuserinfo.model.entity.updateinfo.ModifyUserInfoResult;
import com.study.zouchao.superproject.mypublishtask.model.entity.ChooseUserResult;
import com.study.zouchao.superproject.mypublishtask.model.entity.MyPublishTaskListResult;
import com.study.zouchao.superproject.myreceivedtask.model.entity.FinishResult;
import com.study.zouchao.superproject.myreceivedtask.model.entity.MyReceivedTaskListResult;
import com.study.zouchao.superproject.mywellet.model.chargeresult.ChargeResult;
import com.study.zouchao.superproject.newsdetail.model.result.NewsDetailResult;
import com.study.zouchao.superproject.qustionadd.model.result.questionadd.QuestionAddResult;
import com.study.zouchao.superproject.qustionadd.model.result.updateimg.QuestionUpdateImgResult;
import com.study.zouchao.superproject.register.model.RegisterResult;
import com.study.zouchao.superproject.travellist.entity.TravelListResult;

import java.util.Map;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 *
 *
 *
 * 邹超专用！！！
 *
 *  Retrofit接口
 *
 *
 *
 */

public interface ApiService {

    /**
     * 携程游记列表
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("restapi/soa2/10129/GetTravelListForMobile.json?_fxpcqlniredt=09031155210068025364")
    Observable<TravelListResult> listTravelList(
            @FieldMap Map<String, String> params);


    /**
     * 任务列表
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/task/gettasklist")
    Observable<TaskListResult> listTaskList(
            @FieldMap Map<String, String> params);


    /**
     * 任务详情
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/task/gettaskdetail")
    Observable<TaskDetailResult> getTaskDetail(
            @FieldMap Map<String, String> params);


    /**
     * 百度新闻：共享类资讯
     * baseUrl :  https://news.baidu.com/news?tn=bdapinewsearch
     */
    @FormUrlEncoded
    @POST("news.baidu.com/")
    Observable<BaiduNewResult> getBaiduNews(
            @FieldMap Map<String, String> params);


    /**
     * 上传图片 updateImgByPOST
     */
    @FormUrlEncoded
    @POST("news.baidu.com/")
    Observable<QuestionUpdateImgResult> updateImgByPOST(
            @FieldMap Map<String, String> params);



    @FormUrlEncoded
    @POST("super/rest/task/sponsortask")
    Observable<QuestionAddResult> addQuestionByPOST(
            @FieldMap Map<String, String> params);


    /*
     * https://news.baidu.com/news?tn=bdapiinstantfulltext&src=http://kb.dsqq.cn/html/2017-06/22/content_465981.htm
     */
    @FormUrlEncoded
    @POST("news?tn=bdapiinstantfulltext")
    Observable<NewsDetailResult> getNewsDetailByPOST(
            @FieldMap Map<String, String> params);


    /**
     * 林加欣
     */
    /**
     * 登陆
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/user/login")
    Observable<LoginResult> loginByPOST(
            @FieldMap Map<String, String> params);

    /**
     * 修改用户信息
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/user/updateuser")
    Observable<ModifyUserInfoResult> modifyUserInfosByPOST(
            @FieldMap Map<String, String> params);

    /**
     * 更新头像
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/upload/uploadimg")
    Observable<QuestionUpdateImgResult> uploadImgByPOST(
            @FieldMap Map<String, String> params);



    /**
     * 更新头像
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/user/updateuserphoto")
    Observable<com.study.zouchao.superproject.modifyuserinfo.model.entity.updateimg.UpdateImgResult> uploadUserHeadImgByPOST(
            @FieldMap Map<String, String> params);


    /**
     * 更新头像
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/user/register")
    Observable<RegisterResult> registerByPOST(
            @FieldMap Map<String, String> params);



    /**
     * 我发布的任务列表
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/task/gettasklistbyname")
    Observable<MyPublishTaskListResult> listMyPublishTaskByPOST(
            @FieldMap Map<String, String> params);


    /**
     * 我接受的任务列表
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/user/getusertasklistbyname")
    Observable<MyReceivedTaskListResult> listMyReceivedTaskByPOST(
            @FieldMap Map<String, String> params);


    /**
     * 查询是否已经报名
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("")
    Observable<IsEnrolledResult> isEnrolledByPOST(
            @FieldMap Map<String, String> params);


    /**
     * 查询是否已经报名
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/user/enroltask")
    Observable<EnrollResult> enrollNowByPOST(
            @FieldMap Map<String, String> params);


    /**
     * 选择一个用户
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("super/rest/user/selectenroluser")
    Observable<ChooseUserResult> chooseUserByPOST(
            @FieldMap Map<String, String> params);


    /**
     * 选择一个用户
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("/super/rest/user/adduserbalance")
    Observable<ChargeResult> chargeByPOST(
            @FieldMap Map<String, String> params);



    /**
     * 完成任务
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("/super/rest/user/finishtask")
    Observable<FinishResult> finishTaskByPOST(
            @FieldMap Map<String, String> params);


//
//    @GET("discuss/a/answer/list-username")
//    Observable<PersonInfoDetailAnswerResult> listPersonAnswerByGET(
//            @Query("username") String username);

//
//
}
